package com.neuedu.grainsapi.controller;

import com.neuedu.grainsapi.pojo.NagrProd;
import com.neuedu.grainsapi.service.NagrProdService;
import com.neuedu.grainsapi.util.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController

public class NagrProdController {
    @Autowired
    private NagrProdService nagrProdService;
    @GetMapping("/queryNagrProd")
    public ResponseResult<List<NagrProd>> queryNagrProd(){
        List<NagrProd> nagrProds = nagrProdService.queryNagrProd();
        return new ResponseResult<>("200","yes",nagrProds);
    }
}
